﻿#ifndef C3FDPROJECT_H
#define C3FDPROJECT_H

#include "CommonAPI.h"
#include <QString>
#include <QObject>
#include "C3fdCase.h"

namespace Common
{
	class COMMONAPI C3fdProject
	{
	public:
		static C3fdProject *instance();

		C3fdProject(C3fdProject &) = delete;
		C3fdProject(const C3fdProject &) = delete;
		void operator=(const C3fdProject &) = delete;

		QString getCurrentProjectDir() const;
		void setCurrentProjectDir(QString dir);
		QString getCacheDir() const;

		QString getWorkingConditionDirName() const;
		QString getMeshDirName() const;

		QString getMeshControlFileName() const;
		QString getMeshReportFileName() const;
		QString getMesh3DFileName() const;
		QString getMeshS2FileName() const;
		QString getMeshB2bHubFileName() const;
		QString getMeshB2bMidFileName() const;
		QString getMeshB2bTipFileName() const;

		QString getMeshExeFilePath() const;

		QString getSolverInputDirName() const;
		QString getSolverOutputDirName() const;

		QString getSolverExeFilePath() const;

		QString getPostExeFileDir() const;

		QString getMeshUsedForSolverFileName() const;
		QString getGeomInfoOfBladeFileName() const;

		QString getSolverControlFileName() const;
		QString getSolverTbmodelFileName() const;
		QString getSolverBoundaryFileName() const;
		QString getSolverPerfCurveFileName() const;
		QString getSolverMonitorFileName() const;

		C3fdCase *getCurrentCase();

		bool isFromXml();
	protected:
		C3fdProject() = default;
		virtual ~C3fdProject();

	private:
		static C3fdProject *m_Instance;
		QString m_CurrentProjectDir = "";
		C3fdCase * m_CurrentCase = nullptr;
		bool m_FromXml = false;
	};
}

#endif